package com.wish.g04.house;

import com.wish.g04.common.security.annotation.EnableCustomConfig;
import com.wish.g04.common.security.annotation.EnableRyFeignClients;
import com.wish.g04.common.swagger.annotation.EnableCustomSwagger2;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.ComponentScan;

import javax.annotation.PostConstruct;

@EnableCustomConfig
@EnableCustomSwagger2
@EnableRyFeignClients
@SpringCloudApplication
@ComponentScan(basePackages = {"com.wish.g04.base","com.wish.g04.house"})
public class HouseApplication {

    public static void main(String[] args) {
        SpringApplication.run(HouseApplication.class,args);
    }

    @PostConstruct
    public void init(){
        // 处理 discard long time none received connection
        System.setProperty("druid.mysql.usePingMethod", "false");
        System.setProperty("es.set.netty.runtime.available.processors", "false");

    }
}
